CFLAGS=/nologo /W3 /GS- /GR- /Gy- /Oi- /O1 /c /EHsc /Fobuild\ 
LDFLAGS=/nologo /incremental:no /safeseh:no /merge:.rdata=.text /EMITPOGOPHASEINFO /stub:build\t

all: bin\tcp_client.exe bin\tcp_server.exe

{src}.cpp{build}.obj:
    cl $(CFLAGS) $<

bin\tcp_client.exe:build\tcp_client.obj build\socket.obj build\t Makefile
    link $(LDFLAGS) /OUT:$@ build\tcp_client.obj build\socket.obj

bin\tcp_server.exe:build\tcp_server.obj build\socket.obj build\t Makefile
    link $(LDFLAGS) /OUT:$@ build\tcp_server.obj build\socket.obj

build\tcp_client.obj build\tcp_server.obj build\socket.obj: include\socket.hpp Makefile

build\t: Makefile
    @echo MZ............................................................> build\t

.PHONY: all clean

clean:
    @del /s /q build\*

dist-clean:
    @del /s /q build\* bin\*